package com.levy.annotation;

import org.junit.Test;

import java.lang.annotation.Annotation;
import java.lang.reflect.Method;

public class Main {

	// AnnotationUtils
	
	
	@Test
	public void getAnnotation() {
		try {
			Method method = SuperMan.class.getDeclaredMethod("getName", null);
		} catch (Exception e) {
			e.printStackTrace();
		}
	}

	@Test
	public void getAbstractAnnotation() {
		try {
			Method method = Person.class.getDeclaredMethod("getName", null);
			MyAnnotation mr = method.getAnnotation(MyAnnotation.class);
			System.out.println(mr);
		} catch (Exception e) {
			e.printStackTrace();
		}
	}

}
